#include <stdio.h>

struct queue_record {
    unsigned int q_max_size;
    unsigned int q_front;
    unsigned int q_rear;
    unsigned int q_size;
    int *q_array;
};
typedef struct queue_record *QUEUE;

int is_empty(QUEUE Q) {
    return (Q->q_size == 0);
}

void make_null(QUEUE Q) {
    Q->q_size = 0;
    Q->q_front = 1;
    Q->q_rear = 0;
}

//successor, if next q_rear is equals q_max_size, and then q_rear=0, goto array's first element
unsigned int succ(unsigned int value, QUEUE Q) {
    if (++value == Q->q_max_size)
        value = 0;
    return value;
}

unsigned int if_full(QUEUE Q) {
    if (Q->q_size >= Q->q_max_size)
        return 1;
    return 0;
}

void error(char *s) {}

void enqueue(int x, QUEUE Q) {
    if (if_full(Q)) {
        error("Full queue");
    } else {
        Q->q_size++;
        Q->q_rear = succ(Q->q_rear, Q);
        Q->q_array[Q->q_rear] = x;
    }
}

int main() {
    printf("Hello, World!\n");
    return 0;
}
